home *** CD-ROM | disk | FTP | other *** search
/ Champak 43 / Vol 43.iso / games / superdog.swf / scripts / DefineSprite_1520 / frame_1 / DoAction.as
Encoding:
Text File  |  2007-06-25  |  460 b   |  22 lines

  1. stop();
  2. var yinc = 3;
  3. var down = false;
  4. _parent._parent.enemy_array.push(this._name);
  5. this.swapDepths(100 + _parent._parent.dep++);
  6. onEnterFrame = function()
  7. {
  8.    if(Math.abs(_parent._parent.man._x - this.getBounds(_parent._parent).xMin) <= 20)
  9.    {
  10.       down = true;
  11.    }
  12.    if(down == true)
  13.    {
  14.       this._y += yinc;
  15.       yinc += 0.5;
  16.    }
  17.    if(this.getBounds(_parent._parent).yMin > 450)
  18.    {
  19.       this.removeMovieClip();
  20.    }
  21. };
  22.